#!/bin/sh

i=`ps -ef|grep "msg-listen"|grep java|grep -v grep|awk '{print $2}'`
while [ x$i != x ]; do
  echo "kill $i"
  kill $i
  sleep 2s
  i=`ps -ef|grep "msg-listen"|grep java|grep -v grep|awk '{print $2}'`
done